Top > How to import data > Importing through PowerShell > Parameters used by the cmdlet

Parameters used by the cmdlet

The following table contains a list of the parameters used by the cmdlet. It includes those specific to importing data, as well as some PowerShell general parameters that have been implemented. Parameters can also be placed into a separate source, such as a csv file, that can be piped into the cmdlet. Some examples of using these parameters are provided in Sample cmdlet calls.

 

Parameter

Type

Description

Name

import-specific

(mandatory) The name of the existing template (in Data Management) to be used during the import. Unnamed parameter, position 1.

NOTE: This parameter does not accept values piped to it from a file.

OnErrorAction

import-specific

The action to take when an error occurs while pro­cessing data. The values are Abort and Skip. If an invalid value is used, the script uses the default value Abort. (This does not override or in any way relate to the PowerShell default parameter -ErrorAction). Unnamed parameter, position 2.

NOTE: This parameter does not accept val­ues piped to it from a file.

LiteralPath

csv import

(mandatory) The full path, from the root directory, to the source csv file, including the file name.

SqlServer

SQL Server import

(mandatory) The server where the source SQL database is installed. The server must be accessi­ble, with the current user credentials, from the computer where you are running the script.

SqlDatabase

SQL Server import

(mandatory) The name of the source SQL data­base. The database must be accessible from the computer where you are running the script, with the current user credentials.

Sqlquery

SQL Server import

(mandatory) The query that retrieves your source data from the database. If the query includes escape characters, enclose them in single quota­tion marks. Single quotation marks indicate that Windows PowerShell should not interpret the char­acters as an escape sequence.

Verbose

PowerShell

Triggers the display of the WriteVerbose messages included in the cmdlet. The progress of the cmdlet is displayed as follows: start time, end time, records read, entities created, and entities updated.

Debug

PowerShell

Triggers the display of the WriteDebug messages included in the cmdlet. It provides you with more information about the values returned from service calls.

ErrorAction

PowerShell

Controls how PowerShell handles WriteError mes­sages from the cmdlet. It can have any of the fol­lowing values:

   Continue - PowerShell notifies you when an error occurs and continues running the cmdlet.

   Inquire - PowerShell pauses the cmdlet and asks you how it should proceed.

   SilentlyContinue - PowerShell continues running the cmdlet without notifying you of an error.

   Stop - PowerShell treats the error like a Termi­natingError and stops processing the cmdlet.

NOTE: This parameter does not accept values piped to it from a file.

ErrorVariable

PowerShell

Provides a user defined variable in which to store the WriteError messages, rather than the default $error variable. If the variable name is prefixed with a +, then the messages accumulate, other­wise the variable only holds the most recent error message. The syntax is as follows:  -ErrorVariable myErr or -ErrorVariable +myErr, where myErr is the user variable.